package org.gurms.dao.po.system;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(
		name="sys_privilege",
		uniqueConstraints={@UniqueConstraint(columnNames="privilegename")}
)
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysPrivilege implements Serializable {
	private int privilegeid;
	private String privilegename;
	private String operatetype;

	@Id
	public int getPrivilegeid() {
		return privilegeid;
	}

	public void setPrivilegeid(int privilegeid) {
		this.privilegeid = privilegeid;
	}

	public String getPrivilegename() {
		return privilegename;
	}

	public void setPrivilegename(String privilegename) {
		this.privilegename = privilegename;
	}

	public String getOperatetype() {
		return operatetype;
	}

	public void setOperatetype(String operatetype) {
		this.operatetype = operatetype;
	}
	
	public boolean equals(Object o){
		if(o == null || !(o instanceof SysPrivilege)){
			return false;
		}else{
			return ((SysPrivilege)o).getPrivilegeid() == privilegeid;
		}
	}
	
	public int hashCode(){
		return privilegeid;
	}
}
